import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
// 引入uview1.0x 组件库
import uView from "uview-ui";
Vue.use(uView);
let mpShare = require('uview-ui/libs/mixin/mpShare.js');
Vue.mixin(mpShare)
import {
	PREVIEW_IMAGE,
	IMG_URL,
	ROUTELINK,
	GETDATE,
	PickerData,
	API_URL,
	UPLOADIMAGE,
	PREVIEW_IMAGEARRAY,
	SAVERIMG,
	FORMATCOST,
	CHECKTOKEN,
	EXPLOIT,
	SHOWMODALMSG,
	LOGINMODAL,
	COPY,
	FACEUPLOAD
} from './common/utils.js'; // 引入定义的方法
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()
// 挂载方法到 Vue 原型上
Vue.prototype.$PREVIEW_IMAGE = PREVIEW_IMAGE;
Vue.prototype.$IMG_URL = IMG_URL;
Vue.prototype.$ROUTELINK = ROUTELINK;
Vue.prototype.$GETDATE = GETDATE
Vue.prototype.$PICKERDATA = PickerData
Vue.prototype.$API_URL= API_URL
Vue.prototype.$UPLOADIMAGE = UPLOADIMAGE
Vue.prototype.$PREVIEW_IMAGEARRAY = PREVIEW_IMAGEARRAY;
Vue.prototype.$SAVERIMG = SAVERIMG;
Vue.prototype.$FORMATCOST = FORMATCOST;
Vue.prototype.$CHECKTOKEN = CHECKTOKEN;
Vue.prototype.$EXPLOIT = EXPLOIT;
Vue.prototype.$SHOWMODALMSG = SHOWMODALMSG;
Vue.prototype.$LOGINMODAL = LOGINMODAL;
Vue.prototype.$COPY = COPY;
Vue.prototype.$FACEUPLOAD = FACEUPLOAD;
import BoxComponent from '@/components/BoxComponent.vue';
import Loading from '@/components/loading.vue'
import navButtons from '@/components/nav-buttons.vue';
Vue.component('navButtons', navButtons);
Vue.component('BoxComponent', BoxComponent);
Vue.component('Loading', Loading);
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif